package com.neutech.service.impl;
import com.neutech.mapper.ResultMapper;
import com.neutech.service.ResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public  class ResultServiceImpl implements ResultService {
    @Autowired
    private ResultMapper resultMapper;
    @Override
    public List<Map<String, Object>> queryResult() {
        List<Map<String, Object>> list = resultMapper.queryResultList(0);
        return list;
    }
    @Override
    public void insertResult(Map map){
        Integer a = resultMapper.addResult(map);

    }
    public void updataResult(Map map){
       resultMapper.updataResultById(map);
    }
    @Override
    public void deleteResult(Map map){
       // resultMapper.delResultById(map);
//        System.out.println(map.get("resultid"));
//        System.out.println("kanzheli");
        Integer resultid= Integer.valueOf(map.get("resultid").toString());
        resultMapper.delResultById(resultid);
    }
}
